import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';
//索赔结算单
//结算单状态
export const getPartType = (params) => axios.get(`${SERVER.CLAIMDEALER}/const/getBaseDataByType`, { params });
//*********************************新增*********************************//
//新增的保存
export const newSave = params => axios.post(`${SERVER.CLAIMDEALER}/rPSettle/saveOne`, params);
//*********************************删除*********************************//
//主页面的单条删除
export const deleteOne = (id, params) => axios.post(`${SERVER.CLAIMDEALER}/rPSettle/updateStatusById/${id}`,{params} );

//*********************************修改*********************************//
//编辑的保存
export const editSave = params => axios.post(`${SERVER.CLAIMDEALER}/rPSettle/updateByPtId`,  params );
//修改回显
export const quyrPSettle = (id, params) => axios.get(`${SERVER.CLAIMDEALER}/rPSettle/selectById/${id}`, { params });
//*********************************查*********************************//
//结算单检索
export const getListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rPSettle/getListByPage`, params);
//导出
export const getListForExport = (params) => axios.post(`${SERVER.CLAIMDEALER}/rPSettle/getListForExport`, params, {
  responseType: 'blob'
});
  //下载中心导出
  export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
//提交
export const submitById = (id, params) => axios.post(`${SERVER.CLAIMDEALER}/rPSettle/submitById/${id}`,{params} );






